import request from '@/config/axios'

export interface CouponUserCodeVO {
  id: number
  v2CodeId: number
  uid: number
  ip: number
  ipinfo: number
}

// 查询券码领取记录列表
export const getCouponUserCodePage = async (params) => {
  return await request.get({ url: `/bank/coupon-user-code/page`, params })
}

// 查询券码领取记录详情
export const getCouponUserCode = async (id: number) => {
  return await request.get({ url: `/bank/coupon-user-code/get?id=` + id })
}

// 新增券码领取记录
export const createCouponUserCode = async (data: CouponUserCodeVO) => {
  return await request.post({ url: `/bank/coupon-user-code/create`, data })
}

// 修改券码领取记录
export const updateCouponUserCode = async (data: CouponUserCodeVO) => {
  return await request.put({ url: `/bank/coupon-user-code/update`, data })
}

// 删除券码领取记录
export const deleteCouponUserCode = async (id: number) => {
  return await request.delete({ url: `/bank/coupon-user-code/delete?id=` + id })
}

// 导出券码领取记录 Excel
export const exportCouponUserCode = async (params) => {
  return await request.download({ url: `/bank/coupon-user-code/export-excel`, params })
}
